<#import "/admin/_layer.html" as layout>
<@layout.header "订单详情">
</@layout.header>
<@layout.body>
    <section class="content">
        <div class="container-fluid">
            <div class="card card-default">
                <div class="col-12">
                    <form id="myForm" method="POST" action="/admin/order/doDelivery">
                        <input type="hidden" name="orderId" value="${(order.id)!}">
                        <div class="card-body">
                            <div class="form-group">
                                <label for="expName">物流公司</label>
                                <select class="form-control" name="expName">
                                    <#list express as item>
                                        <option value="${(item.expName)!}" <@selectedIf value=((delivery.expName)! == item.expName)/>>${(item.expName)!}</option>
                                    </#list>
                                </select>
                            </div>
                            <div class="form-group">
                                <label for="billNumber">运单号</label>
                                <input type="text" name="billNumber" class="form-control" id="billNumber" placeholder="请输入运单号" value="${(delivery.billNumber)!}">
                            </div>

                            <div class="form-group">
                                <label>发货时间</label>
                                <input type="input" name="deliveryTime" class="form-control jeegot-datetimepicker" value="<@formatTime value=(delivery.deliveryTime)!></@formatTime>">
                            </div>
                        </div>
                        <div class="card-footer">
                            <button type="submit" class="btn btn-primary">提交</button>
                        </div>
                    </form>
                </div><!-- /.col -->
            </div><!-- /.row -->
        </div><!-- /.container-fluid -->
    </section>

</@layout.body>
<@layout.script>
    <script type="text/javascript">
        $(function () {
            submitForm({
                billNumber: { required: true},
                deliveryTime: {required: true}
            }, {
                billNumber: { required: "请输入运单号"},
                deliveryTime: { required: "请选择发货时间"}
            })
        });
    </script>
</@layout.script>